<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>2、点击图⽚,图⽚向左翻转90度翻转。 </title>
  <style>
    img {
      width: 200px;
      height: 200px;
      margin: 100px;
    }
  </style>
</head>

<body>
  <img src="./1680751853477(1).jpg" alt="" onclick="array()">
  <script>
    let img = document.querySelector('img')
    function array(a) {
      img.style.transform = 'rotate(-90deg)'
    }

  </script>
</body>

</html>